<template>
  <el-form label-width="auto">
    <el-form-item label="key">
      <el-input placeholder="请输入该参数key" v-model:value="formData.key" />
    </el-form-item>
    <el-form-item label="展示名">
      <el-input placeholder="请输入该参数展示名称" v-model:value="formData.label" />
    </el-form-item>
    <el-form-item label="提示语">
      <el-input placeholder="请输入该参数提示语" v-model:value="formData.placeholder" />
    </el-form-item>
  </el-form>
</template>
<script setup lang="ts">
import type { FPInputDescription } from '@/components/function-parameter/fp-input/index'
import { ref } from 'vue'

const props = defineProps({
  description: {
    type: Object as () => FPInputDescription,
    required: false
  }
})

const formData = ref({
  key: props.description?.key || '',
  label: props.description?.label || '',
  placeholder: props.description?.placeholder || ''
})
</script>

<style scoped lang="scss"></style>
